#define DEBUG
#include <cstdio>
#include <cmath>

using namespace std;

const int maxn=100000;

class Point {
public:
  int x, y;
};

int dis(Point *a, Point *b) {
  return abs(a->x-b->x)+abs(a->y-b->y);
}

int max(int a, int b) {
  return a>b ? a : b;
}

int min(int a, int b) {
  return a<b ? a : b;
}

int main() {
  freopen("mhw.in", "r", stdin);
  freopen("mhw.out", "w", stdout);

  static Point man[2][maxn+1];
  int n, m, d;
  scanf("%d %d %d", &n, &m, &d);
  for (int i=1; i<=n; i++) {
    scanf("%d %d", &man[0][i].x, &man[0][i].y);
  }
  for (int i=1; i<=m; i++) {
    scanf("%d %d", &man[1][i].x, &man[1][i].y);
  }

  int ans[2]={};
  for (int i=1; i<n; i++) {
    for (int j=i+1; j<=n; j++) {
      int tx=0, ty=0;
      for (int k=1; k<=m; k++) {
	if (dis(man[0]+i, man[1]+k)<=d && dis(man[0]+j, man[1]+k)>d) {
	  ty++;
	} else if (dis(man[0]+i, man[1]+k)>d && dis(man[0]+j, man[1]+k)<=d) {
	  tx++;
	}
      }
      ans[0] += min(ty, tx);
      ans[1] += max(ty, tx);
    }
  }
  for (int i=1; i<m; i++) {
    for (int j=i+1; j<=m; j++) {
      int tx=0, ty=0;
      for(int k=1; k<=n; k++) {
	if (dis(man[1]+i, man[0]+k)>d && dis(man[1]+j, man[0]+k)<=d) {
	  tx++;
	} else if (dis(man[1]+i, man[0]+k)<=d && dis(man[1]+j, man[0]+k)>d) {
	  ty++;
	}
      }
      ans[0] += min(ty, tx);
      ans[1] += max(ty, tx);
    }
  }

  printf("%d %d", ans[0], ans[1]);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
